package org.yscz.exception;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.yscz.common.enums.AlgResponseEnum;

/**
 * @author achen
 * @create 2021-08-15 23:33
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class AlgAnalysisException extends RuntimeException{
    private Integer code;
    private String msg;

    public AlgAnalysisException(AlgResponseEnum algResponseEnum) {
        this.code = algResponseEnum.getCode();
        this.msg = algResponseEnum.getMsg();
    }
}
